﻿<%@ Page Title="Orbit One Elmah - Error detail" Language="C#" MasterPageFile="~/Pages/MasterPage.Master"
    AutoEventWireup="true" Inherits="OrbitOne.Elmah.Presenter.ErrorDetail" %>

<asp:Content ID="Content1" ContentPlaceHolderID="maincontent" runat="server">
    <div class="errorMessage">
        <h3>
            Error report {<%= ErrorId %>}
        </h3>
        <br />
        -
        <%= O1Error.HappeningTime.ToString("dddd, dd MMMM yyyy HH:mm:ss", System.Globalization.CultureInfo.GetCultureInfoByIetfLanguageTag("en-us").DateTimeFormat)%>
        <br />
        - Application:
        <a href="/Pages/Search.aspx?app=<%= O1Error.ApplicationName%>&tf=1&gv=3&ut=15">
        <%= O1Error.ApplicationName%></a>
            <br />
        <div style="padding: 6px; border: thin solid #008000; float: right; margin-top: -50px">
            <span>Level&nbsp;=&nbsp;<%= O1Error.ErrorLevel%><br />
                Type&nbsp;=&nbsp;<%= O1Error.ErrorType%><br />
                Rules:&nbsp;<%=string.IsNullOrEmpty(O1Error.AppliedRules) ? "n/a" : O1Error.AppliedRules%>
            </span>
        </div>
        <br />
        <hr />
        <div style="background-color: #FFFFCC;">
            <h1>
                URL: <a href="<%= string.Format("{0}://{1}{2}{3}",
                                                ElmahError.ServerVariables["HTTPS"]=="on" ? "https" : "http",
                                                ElmahError.ServerVariables["HTTP_HOST"] ,
                                                ElmahError.ServerVariables["URL"],
                                                !string.IsNullOrEmpty(ElmahError.ServerVariables["QUERY_STRING"]) ? "?" + ElmahError.ServerVariables["QUERY_STRING"] : "")%>"
                    target="_blank">
                    <%= ElmahError.ServerVariables["HTTP_HOST"] + ElmahError.ServerVariables["URL"]%></a>
            </h1>
            <iframe src="ErrorMessageFrame.aspx?id=<%= O1Error.ErrorId %>" width="100%" frameborder="0"
                    height="300">
            </iframe>
        </div>
        <br />
        <div style="background-color:#CCFFCC">
            <h1>
                Client/User
            </h1>
            <ul>
                <li>User name: <%=O1Error.UserName %></li>
                <li>Remote host: <%=ElmahError.ServerVariables["REMOTE_HOST"] %></li>
                <li>Http referer: <%= ElmahError.ServerVariables["HTTP_REFERER"]%></li>
                <li>Http accept language: <%= ElmahError.ServerVariables["HTTP_ACCEPT_LANGUAGE"]%></li>
                <li>Http user agent: <%= ElmahError.ServerVariables["HTTP_USER_AGENT"]%></li>
                <li>Query string: <%= ElmahError.ServerVariables["QUERY_STRING"]%></li>
                <li>Request method: <%= ElmahError.ServerVariables["REQUEST_METHOD"]%></li>
            </ul>
            <br />
        </div>
        <br />
        <div style="background-color:#EEEEEE">
            <h1>
                Server: <%= O1Error.HostName %>
            </h1>
            <asp:Repeater ID="ServerVariables" runat="server">
                <HeaderTemplate>
                    <table style="width:100%;" cellspacing="5">
                </HeaderTemplate>
                <ItemTemplate>
                    <tr>
                        <td style="width:200px;vertical-align:top"><%# Eval("Key") %></td>
                        <td style="width:75%"><div style="width:65%; overflow:auto"><%# Eval("Value") %></div></td>
                    </tr>
                </ItemTemplate>
                <FooterTemplate>
                    </table>
                </FooterTemplate>
            </asp:Repeater>
        </div>
        <br />
        <div style="background-color:#CCEEFF">
            <h1>
                Form
            </h1>
            <asp:Repeater ID="FormVariables" runat="server">
                <HeaderTemplate>
                    <table style="width:100%;" cellspacing="5">
                </HeaderTemplate>
                <ItemTemplate>
                    <tr>
                        <td style="width:50%;overflow:auto;vertical-align:top"><%# Eval("Key") %></td>
                        <td style="max-width:480px;width:50;"><div style="overflow:auto"><%# Eval("Value") %></div></td>
                    </tr>
                </ItemTemplate>
                <FooterTemplate>
                    </table>
                </FooterTemplate>
            </asp:Repeater>
        </div>
        <br />
        <div style="background-color: #FFCC99;">
            <h1>
                Cookies
            </h1>
            <asp:Repeater ID="Cookies" runat="server">
                <HeaderTemplate>
                    <table style="width:100%;" cellspacing="5">
                </HeaderTemplate>
                <ItemTemplate>
                    <tr>
                        <td style="width:200px; vertical-align:top"><%# Server.HtmlEncode(Eval("Key").ToString()) %></td>
                        <td style="width:75%"><div style="overflow:auto"><%# Server.HtmlEncode(Eval("Value").ToString()) %></div></td>
                    </tr>
                </ItemTemplate>
                <FooterTemplate>
                    </table>
                </FooterTemplate>
            </asp:Repeater>
        </div>
    </div>
</asp:Content>
